package com.hit.client.driver.enums;

public enum RobotOtherCommandEnum {
    SET_WORK_MODE("set_work_mode", "设置工作模式"),
    SET_GF_FUNCTION("set_gf_function", "设置光伏功能"),
    SET_GF_IO("set_gf_function", "设置光伏IO使能"),
    SET_GF_RELAY("set_gf_relay", "设置光伏继电器使能"),
    SET_CAR_RELAY("set_car_relay", "设置换行车继电器使能"),
    SET_CAR_ENABLED("set_car_enabled", "设置换行车电机使能"),
    SET_CAR_GO_POS("set_car_go_pos", "设置换行车前往点位"),
    SET_CAR_PUSH("set_car_push", "设置换行车推杆控制"),
    SET_CAR_TASK("set_car_task", "设置换行车任务"),
    ;

    private String name;
    private String des;

    RobotOtherCommandEnum(String name, String des) {
        this.name = name;
        this.des = des;
    }

    public static RobotOtherCommandEnum getByName(String cmdName) {
        for (RobotOtherCommandEnum cmdEnum : RobotOtherCommandEnum.values()) {
            if (cmdEnum.name.equals(cmdName)) {
                return cmdEnum;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public String getDes() {
        return des;
    }
}
